﻿<%@ Page Title="" Language="C#" MasterPageFile="~/RealTwitterApp.Master" AutoEventWireup="true" CodeBehind="AmisTweets.aspx.cs" Inherits="Twitter.AmisTweets" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="pageTitle" runat="server">
 Derniers tweets de <%=user.Identifier.ScreenName %>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageContent" runat="server">

<div class="latest">     
 
 <p>
 <%
  if(Twitter.Connexion.isConnected())
  {    
  %>
    <asp:Button name="searchBtn" id="Button1" class="btn" runat="server" 
         Text="Exporter" onclick="saveUserClicked" /><br />
  <asp:Label ID="saveResult" runat="server"/>  
<%

  } 
%>
</p>

<div class="post_body nicelist">
<ol>
     <% 
         IEnumerable<LinqToTwitter.Status> lst = getFriendTweets();
         bool alt = true;
    if(lst != null)
       
        foreach (LinqToTwitter.Status tw in lst)
        {
            String altClass = alt ? "alt" : "";
            alt = !alt;
   %>
        <li  class="<%=altClass %>">

						<div class="comment_gravatar left">
							<img alt="" src="<%=tw.User.ProfileImageUrl %>" height="32" width="32" />
						</div>

						<div class="comment_author left">
							<span class="comment">@<b><a href="AmisTweets.aspx?userid=<%=tw.User.Identifier.UserID %>"><%=tw.User.Identifier.ScreenName%>&nbsp;&nbsp;</b><%=tw.User.Name %></a></span>
							<div class="date"><%=tw.CreatedAt%></div>
						</div>

						<div class="clearer">&nbsp;</div>
						
						<div class="body">									
							<p><%=tw.Text%></p>
						</div>
					</li>		     
     <%} %>
</ol> 
</div>
</div>
</asp:Content>
